Optimal routing and end-to-end entanglement distribution in quantum networks

Quantum networks are designed to transmit quantum bits (qubits) among quantum devices to enable new network resources for the applications. Entanglement distribution and entanglement swapping are fundamental procedures that are required in several network operations. However, they are probabilistic operations, which can lead to severe network performance degradation. This article investigates the engineering problem of resource allocation in quantum networks, considering factors like entanglement distribution probability, quantum memory characteristics, and fidelity. We model this as an optimization model to obtain an optimal solution. In particular, we formulate an integer linear programming (ILP) and develop a heuristic algorithm, aiming to minimize the number of required entangled qubit pairs (Bell pairs or EPR pairs) in any adjacent pair in the quantum network. Extensive simulations are performed to compare the performance of proposed ILP and heuristic. In all the cases, the heuristic produces a comparable solution to the optimal one. Simulation results ensure that the value of maximum utilized Bell pairs in a quantum network highly depends on the value of the probability of entangled pairs established, considering the time in the quantum memory besides the number of incoming requests.

1. We consider the routing and end-to-end entanglement distribution problem for offline resource allocation on quantum networks.Each request uses single path from respective source to destination nodes and endto-end entanglement distribution is established along the selected path.We consider Bell pairs (EPR pairs) to establish entanglement between adjacent Qnode pairs.Fidelity of the selected paths must be greater than or equal to pre-determined threshold value.Each Qnode has a quantum memory consisting a set of memory cells with fixed memory time.All the memory cells update at the same time and facilitate by a centralized processor.Each request completes its execution within a single life-cycle of memory cells.Symmetric entanglement purification operation is performed for bit-flip channel model to improve the fidelity of Bell pairs.2. We formulate an ILP formulation to solve the offline resource allocation problem in quantum networks considering end-to-end entanglement distribution.We develop a heuristic algorithm for the large problem size where ILP formulation becomes intractable.3. We compare the performance of proposed ILP formulation and developed heuristic algorithm considering extensive simulation scenarios.Simulation results ensure that the developed heuristic provide near to optimal results obtained by the ILP formulation.The performance of the heuristic algorithm is then verified over a large quantum networks with higher number of requests considering different simulation setups.
The remainder of this paper is organized as follows.First, the background of this work is described by providing a brief review of routing and end-to-end entanglement distribution in quantum networks.Next, the proposed optimization model is formulated and the heuristic algorithm is developed.Finally, the experimental results of proposed ILP and heuristic are described.

Background of routing and end-to-end entanglement distribution in quantum networks
In this section, the background of routing and end-to-end entanglement distribution in quantum networks is elaborately described and illustrated with an example on a sample quantum networks.

End-to-end entanglement distribution model
The Bell pair-based entanglement establishment in two adjacent Qnodes of a quantum network involves following three operations: Bell pair generation in these Qnodes, entanglement swapping, and entanglement establishment 9,25,27 .At first, entangled qubit pair (Bell pair) is generated and distributed in the adjacent Qnode pair through quantum link.Next, quantum entanglement operation is performed between these Qnodes and the qubit pair is stored in memory cells of respective Qnodes.Finally, multiple entanglement swapping are performed in a chain of adjacent Qnodes to achieve an end-to-end entanglement distribution 27,28 .
The entanglement establishment operation using quantum repeaters is a probabilistic process and may fail due to quantum decoherence property and imperfect entanglement swapping 9,29 .If this operation fails, the qubits involved in the operation are discarded and a new entanglement establishment process begins with new set of entangled qubit pair.Let two adjacent Qnodes try to establish an entanglement operation with average measurement success probability q.If the demanded net rate is B, the number of Bell pairs required to successfully complete this operation is Z = ⌈ B q ⌉ 11, 16,17 .The net rate B is the number of available Bell pair(s) available to quantum applications, and Z is the gross rate which denotes the number of Bell pair(s) consumed in those adjacent nodes of quantum network.In case of an end-to-end entanglement distribution involving L number of intermediate node(s), the end-to-end measurement success probability Q L 17 is given by Q L = q L .Hence, for a request r with net rate B r and L r number of intermediate node(s), the gross rate of request r Z r is given by Eq. ( 1) 17 : The gross rate Z r denotes the number of required Bell pairs in each intermediate node in the routing path of request r to transmit B r qubit(s).In other words, the net rate is demanded by the request r, whereas the gross rate is that consumed from available network resources 17 .Table 1 reports the value of gross rate for different average measurement success probability q and L for a six nodes sample quantum network shown in Fig. 1a considering net rate B=1.

Fidelity and entanglement purification
In quantum networks, fidelity of the Bell pairs drop whenever an entanglement swap is performed.The fidelity of Bell pairs degrade exponentially with the number of intermediate node(s) L and can be described by the Eq. ( 2) where F ini denotes the initial fidelity of Bell pairs 11,17 . (1) Values of gross rate Z for different values of q using Eq. ( 1) on a six node quantum network for net rate B=1.www.nature.com/scientificreports/From Eq. ( 2), following two cases can be concluded: (i) if F ini =1, then F=F ini , i.e., no degradation in fidelity.
(ii) if F ini < 1, then F degrades exponentially with increased value of L.
In case of a quantum network with noisy intermediate scale quantum (NISQ) constraints, the value of F ini is less than 1, and hence F degrades exponentially according to case (ii).The value of L for a request depends on selected routing path based on several parameters, e.g., available number of Bell pairs in adjacent Qnodes, fidelity, and measurement success probability q 11,16,17 .Without fidelity constraint, for a quantum network with |V| number of Qnodes, range of L is [0, |V | − 2] .However, if the resultant fidelity of a routing path must be greater than F ′ , then F ′ ≥ F , and corresponding value of L from Eq. ( 2) is given by following equation 11 .
The fidelity of output Bell pairs depends on the fidelity of the two input states.With NISQ constraints after performing entangled distribution and quantum storage, the entangled states become mixed states due to several noise in the channel 18,20,30 .Entanglement purification becomes essential to extract maximally entangled states with high fidelity from mixed entangled states 18,20,21 .For example, in case of bit-flip channel model, entangled pair + may suffer a bit flip error and the corresponding mixed state can be represented using the following density operator ̺ 19,30 .
where + denotes a maximally entangled Bell pair.
In the entangled purification process for bit-flip channel model 18,20,21,31 , two CNOT operations are performed in between the pair of qubits of source and destination nodes at the same end of entanglement.Next, a measurement operation is performed on the qubits of second pair in a computational basis.If the qubit pairs are in the same state, the first pair is kept, otherwise it is discarded.This operation is successful if bit-flip error has occurred on both pairs or on no pairs 18,20,31 .The entanglement purification operation keeps the state with maximum fidelity from a pair of entangled states, and destroys the other state and its resources to the available network resources 18,20,31 .
If the input entangled pairs have fidelity F 1 and F 2 , the probability of success and failure of the purification operation are respectively.The resultant fidelity after successful purification operation is given by Eq. (5) 18,30,31 .
In case of symmetric purification operation, if both the input entangled pairs have same fidelity, i.e., F 1 =F 2 =F (say), then the resultant fidelity becomes 18 .The recursive computation of fidelity for L + 1 swapping operation is given by Eq. ( 6) 18,30 , where F L is the fidelity of an entanglement state after performing purification operation in L intermediate node(s).
In this work, we assume symmetric purification operation for source Bell pairs and consider following two schemes to handle fidelity for routing and end-to-end entanglement distribution: (i) without entanglement purification (w/o-P), where fidelity of a Bell pair is measured using Eq.(2) 11,17 , (ii) with entanglement purification (w-P), where fidelity of a Bell pair is updated using Eq. ( 6) 18,30 .

Entanglement-based routing in quantum network
The objective of routing problem in a quantum network is to find the best path for a given request in terms of given constraints such as flow constraints, available resources, minimum fidelity etc. γ ij denotes the capacity of adjacent Qnode pair (i, j), i.e., the rate at which Bell pairs are generated between (i, j) 17 .For a request r ∈ R , a routing path is selected in such a way that required number of Bell pairs (gross rate) along the path is minimum and fidelity constraint is satisfied.As both the fidelity and gross rate degrade exponentially with the number of intermediate node(s), selecting a routing path with a minimum number of intermediate node(s) is favourable.For example, if a request with B=1 selects a routing path with L=1, then gross rate γ will be 2 for q=0.5.If the number of intermediate nodes become 3 (L=3), the gross rate γ becomes 8 for the same value of q.The corresponding fidelity for L=1 and L=3 will be 0.9 and 0.82, respectively considering F ini =0.95 11,17 . (2) Vol.:(0123456789)

Bell pair generation window selection
In this work, we assume that each Qnode in a quantum network has a quantum memory and each quantum memory has a set of memory cells of fixed memory time T M 25,27 .Adjacent Qnode pairs possesses entangled qubit pairs or Bell pairs and an entangled swapping operation consumes an entangled qubit pair.All the memory cells of the quantum network are updated simultaneously.The duration in between Bell pair (EPR pair) generation and termination is termed as a Bell generation window 25,27 .Each Bell generation window w has a fixed starting time A w and ending time B w , i.e., all the Bell pairs are generated at time-stamp A w and terminated at time-stamp B w for each window w.The holding time of any request is much less than the quantum memory time T M 27 .A request r with arrival time a r , deadline b r , and holding time h r can start at any time-stamp in the range [a r , b r − h r + 1] .However, each request must complete its execution within a single Bell generation window.Hence, a request r must select its starting time ∂ r from the range [a r , b r − h r + 1] such that ∂ r ≥ A w and ∂ r + h r − 1 ≤ B w for a Bell generation window w.Any request r must determine the set of Bell pair generation window(s) based on its arrival time, deadline, and holding time maintaining the mentioned constraints.

System model
The quantum network is represented as a graph G(V, E) where V is the set of Qnodes, and E is the set of optical links.The quantum network consists of a centralized processor to govern end-to-end entanglement distribution between any pair of Qnodes.If there exist a link between two Qnodes i and j, Qnode pair (i, j) are referred as adjacent.q is the average measurement success probability of entanglement between any adjacent Qnode pair in G.In this work, we assume that the value of q is the same for all Qnodes in G 9 .Offline resource allocation model over a quantum network is considered where the request set R is known in advance.R is the set of requests to be placed in G, index r.S r and D r are the source and destination nodes of request r.B r denotes the demanded net rate of request r ∈ R .L denotes the set of possible number of intermediate node(s) of a routing path in G, index l.a r and b r are the arrival time and deadline of request r. h r is the holding time of request r.T M is the memory time of memory cells in each Qnode.It is assumed that all qubits in each Qnode have the same memory time 27 .W is the set of Bell pair generation windows, index w.A w and B w are the starting time of window w.Hence, in case of an Bell pair generation window w, all qubits in the quantum network G are generated at time A w and consumed at B w .T is the set of time-stamps, index t.In other words, |W| = T T M .U wt is a constant, 1 if time-stamp t is in Bell pair generation window w, and 0 otherwise.F ′ is the maximum allowed fidelity of any routing path.C is a constant denotes the maximum number of intermediate nodes of any routing path so that fidelity constraint is satisfied according to Eq. ( 3).
The objective of this work is to determine a suitable routing path and select an Bell pair generation window and allocate resource for each request r ∈ R in such a way that required number of Bell pairs in any adjacent node pair of the quantum network at any window is minimum.

Illustration of proposed model
The proposed resource allocation model is illustrated using Fig. 1.A six-Qnodes sample quantum network is shown in Fig. 1a.Nine requests are considered with random source-destination Qnode pair shown in Fig. 1b.The net rate of each request (B) is set to 2 and only one Bell pair generation window is considered so that all requests can be placed in the same window.A snapshot of resource allocation of the request set for q=0.5 and q=0.8 are shown in Figs.2a,b, respectively.In Fig. 2, each rectangular block represents four Bell pairs distributed in adjacent Qnode pair.Fig. 2 plots end-to-end Bell pair distribution along selected routing path for each request, and plot resource allocation model by showing the consumed Bell pairs in each adjacent Qnode pair.The fidelity constraint is not considered in this example to allow requests adopt routing paths of any length.
In case of resource allocation model for q=0.5 (Fig. 2a), each request uses routing path with minimum number of intermediate node(s).For example, source-destination node pair of request r 3 are (5,2) and the shortest paths in terms of number of intermediate nodes are 5-3-2 and 5-4-2 respectively, on which path 5-3-2 is selected.The gross rate of r 3 is 4 as it has one intermediate node (see Table 1), that is 4 Bell pairs are used in each of the node pairs (5,3) and (3,2).In this resource allocation model, the maximum number of Bell pairs used in the quantum network is 24 for adjacent node pair (2,4).
In case of resource allocation model for q=0.8 (Fig. 2b), the maximum number of Bell pairs consumed in the quantum network is 20 for adjacent node pair (3,5).However, requests r 3 and r 4 selected routing paths have www.nature.com/scientificreports/higher number of intermediate nodes compared to the shortest paths, e.g., r 3 uses path 5-3-1-2 with two inter- mediate Qnodes.The gross rate of r 3 is 4 (see Table 1), that is 4 Bell pairs are consumed in each of the node pairs (5,3), (3,1), and (3,2).The same is true for r 4 with routing path 3-1-2-4.It is evident that with an increase in the value of q, the gross rate decreases and requests are allowed to use longer routing paths, provided the fidelity constraint is satisfied.

Proposed optimization model
The proposed resource allocation model to optimize the number of consumed Bell pairs due to end-to-end entanglement distribution is formulated as an ILP problem.The objective of this ILP formulation is to minimize the maximum number of Bell pairs required in between any adjacent Qnode pair.The set of constants, variables, and constraints are described as follows.
The constants used in this ILP formulation are: △ is a positive constant sufficiently large than total net rate by all requests, and ε is a small positive constant such that 0 < ε < 1.
The variables used in this ILP formulation are described below.x r ij is a binary variable, 1 if routing path of request r uses link (i, j), and 0 otherwise.y r i is a binary variable, 1 if i is an intermediate node in routing path of request r, and 0 otherwise.z r is an integer variable denoting the number of intermediate node(s) in routing path of request r. α r l is a binary variable, 1 if routing path of request r has l intermediate node(s), and 0 otherwise.ρ r is an integer variable denoting the gross rate of request r. β r ij is an integer variable denoting the required number of Bell pair(s) in the adjacent node pair (i, j) for request r. φ r is an integer variable denoting the starting time of request r. ω r w is a binary variable, 1 if request r selects window w, and 0 otherwise.∂ r is an integer variable denoting the starting time of selected window by request r.In other words, ∂ r = A w if ω r w = 1 .∂ r is an integer variable denoting the ending time of selected window by request r.In other words, ∂ r = B w if ω r w = 1 .ψ r t is a binary variable, 1 if t ≥ φ r , and 0 otherwise.ψ r t is a binary variable, 1 if t ≤ φ r + h r − 1 , and 0 otherwise.r t is a binary variable, 1 if t ≥ φ r and t ≤ φ r + h r − 1 simultaneously, and 0 otherwise.In other words, r t = 1 if r is active in G at time-stamp t, and 0 otherwise.Y r ijt is a binary variable, 1 if request r uses node pair (i, j) at time-stamp t, and 0 otherwise.Z r ijt is an integer variable denoting the number of Bell pair(s) required in the adjacent node pair (i, j) for request r at time-stamp t. π r ijw is an integer variable denoting the total number of Bell pair(s) required in the adjacent node pair (i, j) at window w.In other words, π r ijw =Z r ijt if values of ω r w and U wt are 1 simultaneously.γ ijw is an integer variable denoting the total number of Bell pair(s) required in the adjacent node pair (i, j) at window w.Ŵ is an integer variable denoting the maximum number of Bell pair(s) required in any adjacent node pair in G.
The ILP formulation is described as follows.
Subject to the following constraints.
• Routing path selection constraints.
Equation (8a) determines the routing path of each request r using flow-constraints on node i for each request r.
If i is an intermediate node in routing path of request r, (8b) sets the value of y r i as 1, and Eq.(8c) computes the total number of intermediate node(s) in the routing path of request r.Eq. (8d) ensures the maximum number of intermediate node(s) in any path must be less than or equal to C to ensure fidelity constraint.
• Gross rate computation constraints.
Equations (9a) and (9b) set the value of α r l as follows.If z r > l , then right-hand side of (9a) becomes positive which ensures α r l =0.When z r ≤ l , (9a), then left-hand side of (9a) becomes negative which ensures that α r l =1 so that right-hand side of (9a) equals to 0. Hence, value of α r l will be 1 only when l ≥ z r .Finally, (9b) ensures www.nature.com/scientificreports/ that for any request r, α r l will be 1 for only one value of l from the set of allowable value(s).Eq. (9c) computes the gross rate for request r based on selected l value.
• Bell pair pair allocation constraints.
Equations (10a) and (10b) define β r ij as follows.If request r does not uses l (i, j) (i.e., x r ji =0), (10a) sets β r ij =0, otherwise some positive value less than or equal to △ .If x r ij =1, (10b) sets the value of β r ij to B r ρ r as △(1 − x r ji ) becomes 0. • Bell pair generation window selection and starting time allocation constraints.Equation (11a) states that each request selects one and only one window for its execution.Equations.(11b) and (11c) computes starting and ending time of the window selected by request r based on ω r w by (11a).Equations (11d) and (11e) ensure that the starting time of request r must be greater than or equal to both the starting time of the selected window ( ∂ r ) and arrival time of request r ( a r ).Equations (11f) and (11g) ensure that request r completes its execution before the ending time of the selected window ( ∂ r ) and deadline of request r ( b r ).
• Execution time computation constraints.
Equations (12a) and (12b) define ψ r t as follows.If t is greater than or equal to φ r + ε , right-hand side of (12a) becomes positive, and hence (12a) forces to set ψ r t =1.In a similar way, if t is less than φ r + ε , (12a) forces to set ψ r t =0.Equations (12c) and (12d) define ψ r t in the same way as (12a) and (12b) define ψ r t .Equations (12e), (12f), and (12g) perform logical ' AND' operation of ψ r t and ψ r t to determine r t as follows.If any of ψ r t and ψ r t is 0, (12e) and (12f) force to set r t =0.If both ψ r t and ψ r t are 1, (12g) forces to set r t =1.Hence, r t is set to 1 only when both ψ r t and ψ r t are 1.

Heuristic algorithm
The optimization model described in previous section works well for small problem size only and becomes intractable for large quantum networks with a higher number of requests.A heuristic algorithm is developed and described in this section to solve this resource allocation problem for large problem size.The key issues must be taken into account while designing this heuristic are: (i) selecting a Bell generation window for each request, and (ii) selecting routing path for each request.The proposed heuristic pre-computes a set of simple shortest paths and set of eligible Bell generation window(s) for each request.A probabilistic method is used to select the Bell generation window for a request from the set of eligible window(s).The routing path is selected using a greedy approach so that the maximum number of Bell pairs required in between any adjacent Qnode pair can be minimized.The proposed heuristic is described in Algorithm 1.
The additional parameters used in Algorithm 1 are described as follows.K is the number of pre-computed simple shortest paths for each request r.PATH r is the set of K simple shortest paths for request r with intermedi- ate node less than or equal to C. path r K denotes the Kth path of PATH r .W is the set of Bell generation windows sorted in ascending order of A w .W r is the set of Bell generation window(s) eligible to place request r in G based on (a r , b r ) .P r w is the probability of placing request r in G in Bell generation window w.G ′ is a temporary copy of the quantum network G in current time-stamp.β r k is the required number of Bell pair(s) in the Qnode(s) in its routing path based on Eq. ( 1) for path r K .γ r k denotes the maximum number of Bell pairs required in any adjacent node pairs of G ( G ′ after placing path K over G ( G ′ ).Ŵ denotes the maximum number of Bell pairs required in any adjacent Qnode pairs of G at any time-stamp.www.nature.com/scientificreports/Algorithm 1. Heuristic Algorithm Algorithm 1 begins with the request set R and the quantum network G(V, E), computes set of K simple shortest paths for each request r ∈ R , and stores them in PATH r .For each request r, the set of Bell generation windows ( W ) is computed and sorted in ascending order of A w .For each Bell pair generation window and each request r, lines 3-10 of Algorithm 1 determine P r w , a probability value to place request r in the quantum network in window w.An increasing probability value is assigned to the available windows for any request r.For example, if three Bell pair generation windows {w 1 , w 2 , w 3 } in ascending order of A w are available for request r, then values of P r w 1 , P r w 2 , and P r w 3 are 1 3 , 2 3 , and 3 3 =1, respectively.Note that, value of P r w for any request r and the last available Bell pair generation window w in terms of time-stamp is always 1, i.e., it must be placed in the quantum network on or before the last available Bell pair generation window.If Bell pair generation window w is unavailable for request r, value of P r w is set to 0. Lines 11-15 of Algorithm 1 select a Bell pair generation window and a starting time for each request r ∈ R .A random number is generated in the range [0, 1] and compared with P r w to place request r in window w.If the value of P r w is greater than or equal to the generated random number, window w will be selected to place request r.Lines 16-31 of Algorithm 1 place request set R in the quantum network G in a greedy way.At the beginning of each window, Bell pairs are generated in between each adjacent node pair and stored at the quantum memory cells (lines 18 and 19).When a Bell pair generation window ends, all the Bell pairs in the quantum network G are discarded (lines 20 and 21).Next, Algorithm 1 checks whether a placed request completes its execution or not; and if yes, it releases the request (lines 23 and 24).When the starting time of any request r is arrived, Algorithm 1 checks which path from set PATH r is favourable in terms of minimizing the objective function [see Eqs.(14a-14e)] based on the current condition of the quantum network.The path in which the maximum number of allocated Bell pair in adjacent node(s) is minimum is selected.In other words, the path k with minimum β r k value is selected for request r and required number of Bell pairs (gross rate) are allocated along each adjacent Qnode pair in the routing path.Algorithm 1 terminates when all requests are placed on the quantum network.www.nature.com/scientificreports/ The computational complexity of Algorithm 1 is computed as follows.The complexity of computing K-shortest path using Yen's Algorithm 32 for each request is O (|R|K(|E| + |V |log|V |)) .The com- plexity to sort Bell pair generation windows is O (|W|log|W|) .The worst-case complexity of line num- bers 3-15 to determine eligible window(s) and select window for each request is O (|R||W|) .The worst-case complexity of line numbers 16-31 to select a routing path and allocate resources on that path for each request is

Experimental results
The performances of proposed ILP model and developed heuristic algorithm are compared in this section.The comparison of proposed approaches are performed in terms of: (i) Ŵ -the maximum number of Bell pairs required in the network, (ii) R LM -the number of requests using routing path with length higher than the corresponding shortest path (in terms of the number of intermediate node(s)), and (iii) fidelity in between without entanglement purification (w/o-P) and with entanglement purification (w-P) considering symmetric purification operation.
A small 9-Qnodes and a large 25-Qnodes sample grid quantum networks are considered for small scale and large scale simulations, respectively.Following parameters are considered to carried out the simulation process: (i) |R|-the number of requests, (ii) |W|-the number of Bell pair generation windows, (iii) q-entanglement success probability, and (iv) B-the net rate of incoming requests.
The simulation is performed 20 times for each set of considered parameters |R|, |W|, q, and B, and the result is obtained with 95% confidence interval.The arrival time a r of the request set is generated by poison distribution with parameters ( |T| 4 , |R|) , and the holding time h r (in time-stamp) of each request is uniformly distributed from the range [1, 4].The deadline of each request is randomly selected from the range [a r + h r + 1, |T|] .The ILP formulation is solved using IBM ILOG CPLEX optimization studio (Version 12.8) 33 .The heuristic algorithm is evaluated using python 3.11.

Experimental results for small scale model
A 3 × 3 grid quantum network topology 25,27 with 9 Qnodes is considered to compare the performances of pro- posed ILP model and developed heuristic algorithm.The number of requests is varied from 20 to 60, with a step of 10, the value of entanglement success probability q is varied from 0.5 to 0.9, with a step of 0.1, and the value of demanded net rate B is varied from 2 to 10, with a step of 2. The value of total time-stamp |T| is set to 36, and number of Bell pair generation windows are considered as 1, 2, 3, and 4: hence respective value of quantum memory time T M is 36, 18, 12, and 9 unit time.The value of F ini and F ′ are set to 0.95 11,17 and 0.78, respectively.The corresponding value of C is 4, i.e., any routing path may use at most 4 intermediate nodes.
Figure 3 reports comparison of the ILP model and heuristic algorithm in terms of Ŵ and they are described as follows.Figure 3a plots the variation of Ŵ with |R| when |W| is set to 2, q is set to 0.7, and B is set to 6.The value of Ŵ increases with an increase in the number of requests for both ILP model and heuristic, as higher number of requests require greater amount resources (Bell pairs).The variation of Ŵ with q is reported in Fig. 3b when |R| is set to 40, |W| is set to 2, and B is set to 6.It is observed that value of Ŵ decreases when q increases in both cases, and can be described using Table 1.For a fixed value of B, the gross rate decreases when value of q is increased, and as a result the value of Ŵ is decreased.Figure 3c plots the variation of Ŵ with |W| when |R| is set to 40, q is set to 0.7, and B is set to 6.When the value of R is fixed and the value of |W| is increased, requests are distributed in multiple Bell pair generation windows.Hence, the number of requests to be placed in a single window is decreased and so that the value of Ŵ .Finally, Fig. 3d plots the variation of Ŵ with B when |R| is set to 40, q is set to 0.7, and |W| is set to 2. The value of Ŵ increases with an increase in the value of demanded net rate B for both the ILP model and heuristic.
In all these cases, ILP model provides optimal solution and the heuristic produces comparable results to the optimal one.For example, in case of Fig. 3a, the maximum deviation in the solution (value of Ŵ ) of ILP model and heuristic is 11.6% for |R|=60.The same holds for other Fig. 3b-d.
Table 2 reports variation R LM for all considered values of q for B=4 and 8, when |R| is set to 60 and |W| is set to 1.In the considered small quantum network, it is observed that when value of q is too high, requests tends to use longer routing paths.This is because gross rate do not differ significantly when number of intermediate nodes in the path increases (see Table 1).The number of requests tends to use longer routing paths tends to decrease when net rate B increases from 4 to 8, as gross rate increases with B. When the value of |W| is increased keeping the values of other parameters fixed, no significant change is observed in the value of R LM .
Table 3 reports the variation of fidelity for ILP and HEU approaches for w/o-P and w-P schemes for all considered values of |R| and B=4 and 8, respectively.The values of q and |W| are set to 0.9 and 1, respectively.It is observed that, with purification, the fidelity is improved by 27.81% compared to w/o-P scheme for ILP when |R|=60 and B=4.Similar results are observed for other |R| and B values as well.In all cases, heuristic approach produce close to optimal solution.

Experimental results for large scale model
The performance of the heuristic algorithm is evaluated on a 5 × 5 grid quantum network topology 25,27      www.nature.com/scientificreports/ Figure 4 reports the performance of heuristic algorithm in terms of Ŵ for q=0.5, 0.7, and 0.9, and are described as follows.Figure 4a plots the variation of Ŵ with |R| when |W| is set to 20 and B is set to 16.The value of Ŵ increases with increasing value of |R| for all considered values of q.The value of Ŵ decreases in a rapid way when value of q increased from 0.5 to 0.9 for any value of |R|. Figure 4b plots the variation of Ŵ with |W| when |R| is set to 800 and B is set to 16.Similar to the small scale results, value of Ŵ decreases when value of |W| is increased from 10 to 30 for all considered values of q. Figure 4c plots the variation of Ŵ with B when |R| is set to 800 and |W| is set to 20.The value of Ŵ increases with an increase in the value of demanded net rate for all considered values of q.
Figure 5 plots the variation R LM with |R| and |W| for q=0.7, 0.8, and 0.9.The variation R LM with |R| is plotted in Fig. 5a when |W| is set to 20, and B is set to 16.The value of R LM increases with increasing value of |R| for q=0.8 and 0.9, but remain almost same for q=0.7.It is observed that R LM is maximum for q=0.9 and minimum for q=0.7, e,g., value of R LM is 244, 76, and 14, for q=0.9, 0.8, and 0.7, respectively when |R|=1200.These longer paths allow load-balancing in the quantum network and minimize the value of Ŵ .The variation R LM with B is plotted in Fig. 5b when |R| is set to 1200 and |W| is set to 20.The value of R LM decreases with increasing value of B for q=0.8 and 0.9, but remain almost same for q=0.7.It is observed that R LM is maximum when B is minimum and minimum when B is maximum for any value of q e,g., value of R LM is 215, 63, and 12, when B=8 and 140, 31, and 0, when B=28 for q=0.9, 0.8, and 0.7, respectively.
Table 4 reports the variation of fidelity for w/o-P and w-P schemes for all considered values of |R| and B=12 and 24, respectively.The values of q and |W| are set to 0.9 and 20, respectively.With purification, the fidelity is improved by 40.4% compared to w/o-P scheme when |R|=1200 and B=12.Similar results are observed for other |R| and B values as well.
From the obtained experimental results discussed above, it can be concluded that the value of maximum utilized Bell pairs in any adjacent node pair Ŵ in a quantum network increases when (i) the number of requests |R| to be placed increases, (ii) the value of entanglement establishment probability q decreases, (iii) the number of Bell pair generation window |W| increases, and (iv) the net rate demanded by requests B increases.It is noted that the requests tend to use longer routing paths when value of entanglement establishment probability increases

Conclusion
In this paper, we considered the offline resource allocation problem in quantum networks and proposed a routing and end-to-end entanglement distribution model considering factors like entanglement distribution probability, quantum memory, and fidelity.We proposed an optimization model and formulated it as an integer linear programming model to obtain the optimal solution of this problem in small quantum networks.We developed a heuristic algorithm to solve this problem for large problem size as the ILP formulation is tractable for small problem sizes only.The performance of proposed ILP and heuristic are compared considering extensive simulation scenarios by varying the number of requests, value of entanglement establishment probability, number of Bell pair generation windows, and demanded net rate by the requests.It is observed that the developed heuristic provided near to the optimal solutions obtained by the ILP formulation.Experimental results ensure that the value of maximum utilized Bell pairs in a quantum network increases when the value of entanglement establishment probability decreases and the number of Bell pair generation windows increases along with the number of requests and demanded net rate.In this work, we considered homogeneous quantum repeater chain, i.e., all Qnodes had the same entanglement establishment probability.Consideration of stochastic analysis with queuing theory for online traffic model in quantum networks is left as the part of our future work.

Figure 1 .
Figure1.A sample quantum network and a set of requests to be placed on the quantum network.

Figure 3 .
Figure 3.Comparison of ILP model and heuristic algorithm in terms of Ŵ in different cases.

Figure 4 .
Figure 4. Variation of Ŵ with |R|, |W|, and B for different values of q.

Figure 5 .
Figure 5. Variation of R LM with |R| and |W| for different values of q.
, and constant U wt to obtain the integer variable π r ijw .Equation (14d) computes the required number of Bell pairs for each adjacent node pair in the quantum network at window w.Equation (14e) defines the objective parameter-the maximum number of Bell pairs required in any adjacent node pair across the quantum network at any window w.The number of binary and integer variables used in this ILP formulation is O (|R||V | 2 |T|) .The number of constraints used in this ILP formulation is O (|R||V | 2 |T|).

Table 2 .
Variation of R LM with q and B.

Table 3 .
Variation of fidelity with |R| and B for w/o-P and w-P schemes for symmetric purification operation.

Table 4 .
Variation of fidelity with |R| and B for w/o-P and w-P schemes for symmetric purification operation.www.nature.com/scientificreports/ to allow load-balancing in the quantum network.The fidelity of Bell pairs increases in case of end-to-end entanglement distribution when entanglement purification operation is performed.